<template>
  <div class="call-me-wrap">
    <img class="img" src="@/assets/images/bg_feedback.png" alt="" srcset="" />
    <div class="line"></div>
    <div class="call-me-right">
      <p class="right-title">
        {{ info.name }}{{ info.name ? '&nbsp;&nbsp;' : '' }}{{ info.phone
        }}<span class="tag" v-if="info.orgName">{{ info.orgName }}</span>
      </p>
      <p class="right-des">{{ info.email }}</p>
    </div>
  </div>
</template>
<script lang="ts" setup>
import { ref } from 'vue'
import type { IContactInfo } from '@/apis/workbench/model/workbenchModel'
import { getContactInfo } from '@/apis/workbench/index'

const info = ref({} as IContactInfo)
const loadInfo = async () => {
  info.value = await getContactInfo()
}
loadInfo()
</script>
<style lang="scss" scoped>
.call-me-wrap {
  width: 100%;
  height: 88px;
  background: url('~@/assets/images/bg_callme.png') no-repeat;
  background-size: 100% 88px;
  padding: 0 17px;
  display: flex;
  align-items: center;
  .img {
    width: 75px;
    height: 88px;
  }
  .line {
    width: 1px;
    height: 40px;
    background: #ebeff2;
    border-radius: 2px;
    margin: 0 16px 0 8px;
  }
  .call-me-right {
    .right-title {
      font-size: 14px;
      font-family:
        PingFangSC-Regular,
        PingFang SC;
      font-weight: 400;
      color: #0a1f33;
      line-height: 20px;
    }
    .right-des {
      margin-top: 2px;
      height: 20px;
      font-size: 14px;
      font-family:
        PingFangSC-Regular,
        PingFang SC;
      font-weight: 400;
      color: #308bf2;
      line-height: 20px;
    }
  }
  .tag {
    margin-left: 6px;
    height: 20px;
    background: #f8fbfc;
    border-radius: 3px;
    border: 1px solid #ebeff2;
    font-size: 12px;
    font-family:
      PingFangSC-Regular,
      PingFang SC;
    font-weight: 400;
    color: #7a8a99;
    line-height: 20px;
    text-align: center;
    display: inline-block;
    padding: 0;
    padding: 0 6px;
  }
}
</style>
